<?php
include_once('admin_global.php');
bn_include_lib('bn_jquery');
$theme->add_block('body');

$theme->add_script(jquery_checkbox());
$theme->add_script(jquery_select());
$theme->add_script(jquery_text());
$theme->add_script(jquery_element('textarea','change','$.post(window.location.href,{cmd:$(this).attr("id"),value:$(this).val()})'));

$cmd=$_POST['cmd'];
if(isset($cmd))
{
$conf->Set_value($cmd,$_POST['value']);
die;
}
?>
<script>
window.onload=function(){$('.accord').hide();}

 $('label').live('click',function(){
    $(this).next('div').toggle(700);
 });   
 
</script>
<style scoped>
label{
    border:1px solid gray;
    display: block;
    width: 98%;
    border-radius:5px 5px 0px 0px ;
    padding: 5px;
    background-color: silver;
    margin-bottom: 5px;
}
</style>
<label>تنظیمات عمومی</label>
<div class="accord">
<table>
<tr>
	<td><?= $lang[27] ?></td>
	<td><input type="text" size="35" autocomplete="on" name="header" id="header" value="<?= $conf->get_header() ?>"  class="input-text"/></td>
</tr>
<tr>
	<td><?= $lang[28] ?></td>
	<td><input type="text" size="85" autocomplete="on" name="footer" id="footer" value="<?= $conf->get_footer(); ?>" class="input-text"/></td>
</tr>
<tr>
	<td><?= $lang[29] ?></td>
	<td><?= $lan->lang_list(array('name'=>'default_language','cssclass'=>'select','selected'=>$conf->Get_value('default_language'))); ?></td>
</tr>
<tr>
	<td><?= $lang[30] ?></td>
	<td><input type="text" size="35" autocomplete="on" name="timezone" id="timezone" value="<?= $conf->Get_value('timezone'); ?>" class="input-text"/></td>
</tr>
<tr>
	<td><?= $lang[33] ?></td>
	<td><textarea name="mail_active" id="mail_active" cols="82" rows="5" wrap="virtual" class="input-text"><?= $conf->Get_value('mail_active'); ?></textarea></td>
</tr>
<tr>
	<td><?= $lang[34] ?></td>
	<td><textarea name="mail_password" id="mail_password" cols="82" rows="5" wrap="virtual" class="input-text"><?= $conf->Get_value('mail_password'); ?></textarea></td>
</tr>
<tr>
	<td><?= $lang[31] ?></td>
	<td><input type="checkbox" name="captcha" id="captcha" class="checkbox" <?= $conf->Get_value('captcha'); ?>/></td>
</tr>
<tr>
	<td><?= $lang[32] ?></td>
	<td><input type="checkbox" name="undercons" id="undercons" class="checkbox" <?= $conf->Get_value('undercons'); ?>/></td>
</tr>
<tr>
	<td><?= $lang[35] ?></td>
	<td><input type="checkbox" name="access_page" id="enable_anony" class="checkbox" <?= $conf->Get_value('enable_anony'); ?>/></td>
</tr>
<tr>
	<td><?= $lang[79] ?></td>
	<td><input type="checkbox" name="captcha" id="enable_signup" class="checkbox" <?= $conf->Get_value('enable_signup'); ?>/></td>
</tr>
<tr>
	<td><?= $lang[80] ?></td>
	<td><input type="checkbox" name="captcha" id="enable_user" class="checkbox" <?= $conf->Get_value('enable_user'); ?>/></td>
</tr>
<br />
</table>
</div>

<label>تنظیمات اپلود</label>
<div class="accord">
<table>
<tr>
	<td><?= $lang[83]?></td>
	<td><input type="text" size="10" autocomplete="on" name="img_size" id="img_size" value="<?= $conf->Get_value('img_size'); ?>"  class="input-text"/></td>
</tr>
<tr>
	<td><?= $lang[84]?></td>
	<td><input type="text" size="10" autocomplete="on" name="file_size" id="file_size" value="<?= $conf->Get_value('file_size'); ?>"  class="input-text"/></td>
</tr>
<tr>
	<td><?= $lang[91]?></td>
	<td><input type="text" size="10" autocomplete="on" name="smalthumb" id="smalthumb" value="<?= $conf->Get_value('smalthumb'); ?>"  class="input-text"/></td>
</tr>
<tr>
	<td><?= $lang[92]?></td>
	<td><input type="text" size="10" autocomplete="on" name="largthumb" id="largthumb" value="<?= $conf->Get_value('largthumb'); ?>"  class="input-text"/></td>
</tr>
</table>
</div>
<?php
$theme->render();
?>